//
// Created by martin on 8/19/21.
//

#ifndef FTPSERVER2_0_QUEUE_H
#define FTPSERVER2_0_QUEUE_H

#include <sys/types.h>
#include "../src/taskqueue.h"

typedef struct node{
    ElemType* e;
    struct node *prev;
    struct node *next;
}Node;

typedef struct queue {
    Node *head;
    Node *tail;
    size_t size;
}Queue;

Queue *queue_new();
void queue_free(Queue *q);
int queue_offer(Queue *q, ElemType *e);
ElemType *queue_poll(Queue *q);

__attribute__((unused)) ElemType *queue_peek(Queue *q);


#endif //FTPSERVER2_0_QUEUE_H
